import request from '../request';

/**
 * 获取婚礼活动列表
 * @returns {Promise}
 */
export const getEvents = () => {
  return request({
    url: '/events',
    method: 'get'
  });
};

/**
 * 添加婚礼活动
 * @param {Object} data - 婚礼活动信息
 * @returns {Promise}
 */
export const addEvent = (data) => {
  return request({
    url: '/events',
    method: 'post',
    data
  });
};

/**
 * 更新婚礼活动
 * @param {string} id - 婚礼活动ID
 * @param {Object} data - 婚礼活动信息
 * @returns {Promise}
 */
export const updateEvent = (id, data) => {
  return request({
    url: `/events/${id}`,
    method: 'put',
    data
  });
};

/**
 * 删除婚礼活动
 * @param {string} id - 婚礼活动ID
 * @returns {Promise}
 */
export const deleteEvent = (id) => {
  return request({
    url: `/events/${id}`,
    method: 'delete'
  });
};